package com.hyxy.demo;

import java.util.List;
import java.util.Map;

public class Driver implements IDriver {
    private String name;
    private IVehicle vehicle;
    private List tels;
    private Map map;

    public List getTels() {
        return tels;
    }

    public void setTels(List tels) {
        this.tels = tels;
    }

    public Map getMap() {
        return map;
    }

    public void setMap(Map map) {
        this.map = map;
    }

    public Driver(){
        System.out.println("---Driver()---");
    }
    public Driver(String name){
        System.out.println("---Driver(String name)---");
        this.name = name;
    }
    public Driver(int age){
        System.out.println("---Driver(int age)---");
    }
    public Driver(String name,int age){
        System.out.println("---Driver(String name,int age)---");
    }
   public Driver(int age,String name){
        System.out.println("---Driver(int age,String name)---");
    }
    public Driver(String name,IVehicle vehicle){
        System.out.println("---Driver(String name,IVehicle vehicle)---");
        this.name = name;
        this.vehicle = vehicle;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public IVehicle getVehicle() {
        return vehicle;
    }

    public void setVehicle(IVehicle vehicle) {
        this.vehicle = vehicle;
    }

    @Override
    public void driving() {
        System.out.println(name+"开"+vehicle.getName()+"去东北，撞了");
    }

}
